#include <cstdio>

int main() {
	int n;
	scanf("%d", &n);
	int cnt = 0;
	while (n!=1) {
		if (n%2) {
			n = (3*n+1)/2;
		} else {
			n = n/2;
		}
		cnt++;
	}
	printf("%d\n", cnt);
	return 0;
}
